<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Dem Bones: Overview</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="DemBones_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Dem Bones
   &#160;<span id="projectnumber">1.2.0</span>
   </div>
   <div id="projectbrief">Skinning Decomposition Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('index.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="PageDoc"><div class="header">
  <div class="headertitle">
<div class="title">Overview </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>Main elements:</p><ul>
<li><a class="el" href="class_dem_1_1_dem_bones.html">DemBones</a> : base class with the core solver using relative bone transformations <a class="el" href="class_dem_1_1_dem_bones.html#a3462ee570b8b809ecff8739000783813" title="Bone transformations, size = [4*nF*4, 4*nB], m.blk4(k, j) is the 4*4 relative transformation matrix o...">DemBones::m</a></li>
<li><a class="el" href="class_dem_1_1_dem_bones_ext.html">DemBonesExt</a> : extended class to handle hierarchical skeleton with local rotations/translations and bind matrices</li>
<li><a class="el" href="_mat_blocks_8h.html" title="Defines some macros to access sub-blocks of packing transformation/position matrices for convenience.">DemBones/MatBlocks.h</a>: macros to access sub-blocks of packing transformation/position matrices for convenience</li>
</ul>
<p>Include <a class="el" href="_dem_bones_ext_8h.html">DemBones/DemBonesExt.h</a> (or <a class="el" href="_dem_bones_8h.html">DemBones/DemBones.h</a>) with optional <a class="el" href="_mat_blocks_8h.html" title="Defines some macros to access sub-blocks of packing transformation/position matrices for convenience.">DemBones/MatBlocks.h</a> then follow these steps to use the library:</p><ol type="1">
<li>Load required data in the base class:<ul>
<li>Rest shapes: <a class="el" href="class_dem_1_1_dem_bones.html#aae8731033731fbe34df518e15137724a" title="Geometry at the rest poses, size = [3*nS, nV], u.col(i).segment(3*s, 3) is the rest pose of vertex i ...">DemBones::u</a>, <a class="el" href="class_dem_1_1_dem_bones.html#ac4f7e7cb1b5cdfd737ddfc9e682de6f5" title="Mesh topology, size=[number of polygons], fv[p] is the vector of vertex indices of polygon p.">DemBones::fv</a>, <a class="el" href="class_dem_1_1_dem_bones.html#a277dac86c8474a12eb489bedf98ddee2" title="Number of vertices, typically indexed by i.">DemBones::nV</a></li>
<li>Sequence: <a class="el" href="class_dem_1_1_dem_bones.html#a276046cc5a2a13802762d65c17ec67fb" title="Animated mesh sequence, size = [3*nF, nV], v.col(i).segment(3*k, 3) is the position of vertex i at fr...">DemBones::v</a>, <a class="el" href="class_dem_1_1_dem_bones.html#aa9cf74a32230ec9c61096a58cdc555bf" title="Number of total frames, typically indexed by k, nF = fStart(nS)">DemBones::nF</a>, <a class="el" href="class_dem_1_1_dem_bones.html#adf3d4f2aa7408bb6a9db540e86fd69c7" title="Start frame indices, size = nS+1, fStart(s), fStart(s+1) are data frames for subject s.">DemBones::fStart</a>, <a class="el" href="class_dem_1_1_dem_bones.html#ac99a3d810ab4fc1286e9677ce5c322b0" title="Subject index of the frame, size = nF, subjectID(k)=s, where fStart(s) &lt;= k &lt; fStart(s+1)">DemBones::subjectID</a>, <a class="el" href="class_dem_1_1_dem_bones.html#a913edb0e3273c6b18012c000a0764915" title="Number of subjects, typically indexed by s.">DemBones::nS</a></li>
<li>Number of bones <a class="el" href="class_dem_1_1_dem_bones.html#aa0b51ddfe06be09fdf3c74a00f5dd867" title="Number of bones, typically indexed by j.">DemBones::nB</a></li>
</ul>
</li>
<li>Load optional data in the base class:<ul>
<li>Skinning weights <a class="el" href="class_dem_1_1_dem_bones.html#a8fa642adc3a5610f0a391fa5f437a9b3" title="Skinning weights, size = [nB, nV], w.col(i) are the skinning weights of vertex i, w(j,...">DemBones::w</a> and weights soft-lock <a class="el" href="class_dem_1_1_dem_bones.html#a153f756d2284f955e35229f15753264c" title="Skinning weights lock control, size = nV, lockW(i) is the amount of input skinning weights will be ke...">DemBones::lockW</a></li>
<li>Bone transformations <a class="el" href="class_dem_1_1_dem_bones.html#a3462ee570b8b809ecff8739000783813" title="Bone transformations, size = [4*nF*4, 4*nB], m.blk4(k, j) is the 4*4 relative transformation matrix o...">DemBones::m</a> and bones hard-lock <a class="el" href="class_dem_1_1_dem_bones.html#a8391d148fee49d4c056b3b62bc1c7c08" title="Bone transformation lock control, size = nB, lockM(j) is the amount of input transformations will be ...">DemBones::lockM</a></li>
</ul>
</li>
<li>[<code>optional</code>] Set parameters in the base class:<ul>
<li><a class="el" href="class_dem_1_1_dem_bones.html#aa7f14b41174dc22e81b089d0c5a56950" title="[parameter] Number of global iterations, default = 30">DemBones::nIters</a></li>
<li><a class="el" href="class_dem_1_1_dem_bones.html#a9079e21634edb0dd2502bfc3a1eedbd0" title="[parameter] Number of clustering update iterations in the initalization, default = 10">DemBones::nInitIters</a></li>
<li><a class="el" href="class_dem_1_1_dem_bones.html#a9afbf2acccc4126e1e76c2a41f3ac649" title="[parameter] Number of bone transformations update iterations per global iteration,...">DemBones::nTransIters</a>, <a class="el" href="class_dem_1_1_dem_bones.html#a53f9859cd63a8c51f6f50fdfa7251681" title="[parameter] Translations affinity soft constraint, default = 10.0">DemBones::transAffine</a>, <a class="el" href="class_dem_1_1_dem_bones.html#a3b125934b440ebcebb3ba44acda41366" title="[parameter] p-norm for bone translations affinity soft constraint, default = 4.0">DemBones::transAffineNorm</a></li>
<li><a class="el" href="class_dem_1_1_dem_bones.html#ae381fbe6610c9f4b169b16106dfbae94" title="[parameter] Number of weights update iterations per global iteration, default = 3">DemBones::nWeightsIters</a>, <a class="el" href="class_dem_1_1_dem_bones.html#ad6ded1630b2bac8d192e6134823a37f8" title="[parameter] Number of non-zero weights per vertex, default = 8">DemBones::nnz</a>, <a class="el" href="class_dem_1_1_dem_bones.html#aba10dbe999f33dfb5456c0f3554700a3" title="[parameter] Weights smoothness soft constraint, default = 1e-4">DemBones::weightsSmooth</a>, <a class="el" href="class_dem_1_1_dem_bones.html#a26babdede07e8e220002e420b9161aa9" title="[parameter] Step size for the weights smoothness soft constraint, default = 1.0">DemBones::weightsSmoothStep</a>, <a class="el" href="class_dem_1_1_dem_bones.html#afab4c23ab2a15d11225934c9e4252881" title="[parameter] Epsilon for weights solver, default = 1e-15">DemBones::weightEps</a></li>
</ul>
</li>
<li>[<code>optional</code>] Setup extended class:<ul>
<li>Load data: <a class="el" href="class_dem_1_1_dem_bones_ext.html#ad740868b3bc6cdf34e6e2ec5f35e24d7" title="Parent bone index, [size] = nB, parent(j) is the index of parent bone of j, parent(j) = -1 if j has n...">DemBonesExt::parent</a>, <a class="el" href="class_dem_1_1_dem_bones_ext.html#a3785152d056860bc55febcad64837ef3" title="Inverse pre-multiplication matrices, [size] = [4*nS, 4*nB], preMulInv.block(4*s, 4*j,...">DemBonesExt::preMulInv</a>, <a class="el" href="class_dem_1_1_dem_bones_ext.html#a30f4bfbe88493adecae038035e0b33be" title="Rotation order, [size] = [3*nS, nB], rotOrder.col(j).segment&lt;3&gt;(3*s) is the rotation order of bone j ...">DemBonesExt::rotOrder</a>, <a class="el" href="class_dem_1_1_dem_bones_ext.html#a9a6a2004f16832cd3f97c22789147a8a" title="Orientations of bones, [size] = [3*nS, nB], orient.col(j).segment&lt;3&gt;(3*s) is the(rx,...">DemBonesExt::orient</a>, <a class="el" href="class_dem_1_1_dem_bones_ext.html#a85422fd18d48c40485f05d77b1c4cf4d" title="Original bind pre-matrix, [size] = [4*nS, 4*nB], bind.block(4*s, 4*j, 4, 4) is the global bind matrix...">DemBonesExt::bind</a></li>
<li>Set parameter <a class="el" href="class_dem_1_1_dem_bones_ext.html#a92939c0de147f8075754d9cbf66113fc" title="Bind transformation update, 0=keep original, 1=set translations to p-norm centroids (using transAffin...">DemBonesExt::bindUpdate</a></li>
</ul>
</li>
<li>[<code>optional</code>] Override callback functions (cb...) in the base class <a class="el" href="class_dem_1_1_dem_bones.html">DemBones</a></li>
<li>Call decomposition function <a class="el" href="class_dem_1_1_dem_bones.html#ac8d2821c730539490ad6ce956a0b62a6" title="Skinning decomposition by nIters iterations of alternative updating weights and bone transformations.">DemBones::compute()</a>, <a class="el" href="class_dem_1_1_dem_bones.html#a3101275f535d5c2435747b8ea5406f7d" title="Update skinning weights by running nWeightsIters iterations with weightsSmooth and weightsSmoothStep ...">DemBones::computeWeights()</a>, <a class="el" href="class_dem_1_1_dem_bones.html#a673287121735ea64e0e4c244bacc432b" title="Update bone transformations by running nTransIters iterations with transAffine and transAffineNorm re...">DemBones::computeTranformations()</a>, or <a class="el" href="class_dem_1_1_dem_bones.html#af1fcf96f35f6c4662fd95998225b9bda" title="Initialize missing skinning weights and/or bone transformations.">DemBones::init()</a></li>
<li>[<code>optional</code>] Get local transformations/bind poses with <a class="el" href="class_dem_1_1_dem_bones_ext.html#a4be2b221fa273518adbd3fa2e2bc86d0" title="Local rotations, translations and global bind matrices of a subject.">DemBonesExt::computeRTB()</a> </li>
</ol>
</div></div><!-- PageDoc -->
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.16 </li>
  </ul>
</div>
</body>
</html>
